﻿using EasyCore.Core.Modules;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EasyCore.Core.Builders
{
    public interface IModuleBuilder
    {
        /// <summary>
        /// 获得加载模块的集合
        /// </summary>
        List<EasyModule> Modules { get; set; }

        /// <summary>
        /// 添加指定模块
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        IModuleBuilder AddModule<T>() where T : EasyModule;


        /// <summary>
        /// 添加系统的所有模块，并可排除指定的EasyModule类型
        /// </summary>
        /// <param name="excludeModuleTypes"></param>
        /// <returns></returns>
        IModuleBuilder AddModules(params Type[] excludeModuleTypes);
    }
}
